#include "LabelNode.h"		

#include "../Game.h"

LabelNode::LabelNode(irr::scene::ISceneNode* parent, irr::core::stringw name, float offset, 
		irr::scene::ISceneManager* scn) : 
	ContainedNode(parent,offset,50,5,scn), 
	m_string(name) { 
//	m_labelNode = Game::CreateTextNode(name,core::dimension2df(m_width,m_height),
//			getLocalPosition(),true,m_parent);
	m_labelNode = Game::CreateTextNode(name,getLocalPosition(),true,m_parent);
		
//			m_nameNode->setVisible(false);			
}

void LabelNode::changeNodeString() {
	m_labelNode->setText(m_string.c_str());
}

LabelNode::~LabelNode() { 
	m_labelNode->remove();
}

void LabelNode::changeString(irr::core::stringw name) { 
	m_string = name; 
	changeNodeString();
}